/**
 * file name:		TestSwapByteBuffer.java
 * copyright:		© 2009 Kingsoft
 * author:			TanMenglong
 * version:			?.??
 * created:			2009-08-10
 * last modified:	2009-08-10
 * description:		HERE
 */

package buffer.testcase;

import java.io.IOException;

import buffer.SwapByteArray1;

/**
 * .
 * @author TanMenglong
 *
 */
public class TestSwapByteBuffer1 {

	public static void main(String[] args) {
		SwapByteArray1 buffer = new SwapByteArray1(1, 1, "/dustbin/test/buffer.tmp");
		try {
			buffer.init();
			byte[] b = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,};
			buffer.write(b, 0);
			for (int i = 0; i < buffer.length(); ++i) {
				System.out.printf("%x\n", buffer.read(i) & 0x000000FF);
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				buffer.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}

}
